package com.glink.manage.dto.code;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@Data
public class CodeAddDTO {

    @ApiModelProperty(value = "字典名字", required = true)
    @NotBlank(message = "代码名(name)不能为空")
    @Size(max = 250, message = "字典名字不能超过250个字符")
    private String name;

    @ApiModelProperty(value = "字典类型(父级的代码类型)", required = true)
    @NotBlank(message = "代码类型(parentType)不能为空")
    @Size(max = 50, message = "代码值不能超过20个字符")
    private String parentType;

    @ApiModelProperty(value = "字典说明")
    private String remark;

    @ApiModelProperty(value = "代码值", required = true)
    @NotBlank(message = "代码值(key)不能为空")
    @Size(max = 36, message = "代码值不能超过36个字符")
    private String key;

}
